<?php

if( ! defined('DOCROOT') )
{
    require_once '/var/www/advancelab/chilik2/unittest/bootstrap.php';
}

class RoutingInformationTest extends UnitTestCase
{
    function testingRoutingInformationTest()
    {
        $struct = new Implementation\RoutingInformation();
        
        $this->assertIdentical($struct,new Implementation\RoutingInformation);
        $this->assertTrue($struct instanceof Implementation\RoutingInformation);
        
        $struct->matchedRoute = 'php';
        $this->assertEqual( 'php', $struct->matchedRoute );
        $struct->controllerClass = 'ezc';
        $this->assertEqual( 'ezc', $struct->controllerClass );
        $struct->action = 'ezp';
        $this->assertEqual( 'ezp', $struct->action );
        
        /* $this->dump($struct); */
    }
    
    public function testMockingMethod()
    {
        $state = array(
        'matchedRoute' => 'php',
        'controllerClass' => 'ezc',
        'action' => 'ezp',
        'router' => null,
        );
        
        $struct = Implementation\RoutingInformation::__mock( $state );
        
        $this->assertEqual( 'php', $struct->matchedRoute );
        $this->assertEqual( 'ezc', $struct->controllerClass );
        $this->assertEqual( 'ezp', $struct->action );
    }
    
}
